import okhttp3.RequestBody;

import static kotlin.jvm.internal.Intrinsics.checkNotNull;

/**
 * Created by wangxingsheng on 2019/5/5.
 */
public class OkHttpTest {
    public static final String MULTIPART_JSON_DATA = "application/json; charset=utf-8";
    public static void main(String[] args){
        String jsonString = "";
        createJson(jsonString);
        System.out.println("out");
    }

    public static RequestBody createJson(String jsonString) {
        checkNotNull(jsonString, "json not null!");
        return RequestBody.create(okhttp3.MediaType.parse(MULTIPART_JSON_DATA), jsonString);
    }
}
